home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / gtk-2.0 / gdk / gdkregion.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-04-25  |  3.5 KB  |  110 lines

  1. /* GDK - The GIMP Drawing Kit
  2.  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3.  *
  4.  * This library is free software; you can redistribute it and/or
  5.  * modify it under the terms of the GNU Lesser General Public
  6.  * License as published by the Free Software Foundation; either
  7.  * version 2 of the License, or (at your option) any later version.
  8.  *
  9.  * This library is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.  * Lesser General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU Lesser General Public
  15.  * License along with this library; if not, write to the
  16.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.  * Boston, MA 02111-1307, USA.
  18.  */
  19.  
  20. /*
  21.  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
  22.  * file for a list of people on the GTK+ Team.  See the ChangeLog
  23.  * files for a list of changes.  These files are distributed with
  24.  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  25.  */
  26.  
  27. #ifndef __GDK_REGION_H__
  28. #define __GDK_REGION_H__
  29.  
  30. #include <gdk/gdktypes.h>
  31.  
  32. G_BEGIN_DECLS
  33.  
  34. /* GC fill rule for polygons
  35.  *  EvenOddRule
  36.  *  WindingRule
  37.  */
  38. typedef enum
  39. {
  40.   GDK_EVEN_ODD_RULE,
  41.   GDK_WINDING_RULE
  42. } GdkFillRule;
  43.  
  44. /* Types of overlapping between a rectangle and a region
  45.  * GDK_OVERLAP_RECTANGLE_IN: rectangle is in region
  46.  * GDK_OVERLAP_RECTANGLE_OUT: rectangle in not in region
  47.  * GDK_OVERLAP_RECTANGLE_PART: rectangle in partially in region
  48.  */
  49. typedef enum
  50. {
  51.   GDK_OVERLAP_RECTANGLE_IN,
  52.   GDK_OVERLAP_RECTANGLE_OUT,
  53.   GDK_OVERLAP_RECTANGLE_PART
  54. } GdkOverlapType;
  55.  
  56. typedef void (*GdkSpanFunc) (GdkSpan *span,
  57.                  gpointer data);
  58.  
  59. GdkRegion *gdk_region_new       (void);
  60. GdkRegion *gdk_region_polygon   (GdkPoint     *points,
  61.                  gint          npoints,
  62.                  GdkFillRule   fill_rule);
  63. GdkRegion *gdk_region_copy      (GdkRegion    *region);
  64. GdkRegion *gdk_region_rectangle (GdkRectangle *rectangle);
  65. void       gdk_region_destroy   (GdkRegion    *region);
  66.  
  67. void           gdk_region_get_clipbox    (GdkRegion     *region,
  68.                                           GdkRectangle  *rectangle);
  69. void           gdk_region_get_rectangles (GdkRegion     *region,
  70.                                           GdkRectangle **rectangles,
  71.                                           gint          *n_rectangles);
  72.  
  73. gboolean       gdk_region_empty    (GdkRegion    *region);
  74. gboolean       gdk_region_equal    (GdkRegion    *region1,
  75.                     GdkRegion    *region2);
  76. gboolean       gdk_region_point_in (GdkRegion    *region,
  77.                     int           x,
  78.                     int           y);
  79. GdkOverlapType gdk_region_rect_in  (GdkRegion    *region,
  80.                     GdkRectangle *rect);
  81.  
  82. void gdk_region_offset          (GdkRegion    *region,
  83.                  gint          dx,
  84.                  gint          dy);
  85. void gdk_region_shrink          (GdkRegion    *region,
  86.                  gint          dx,
  87.                  gint          dy);
  88. void gdk_region_union_with_rect (GdkRegion    *region,
  89.                  GdkRectangle *rect);
  90. void gdk_region_intersect       (GdkRegion    *source1,
  91.                  GdkRegion    *source2);
  92. void gdk_region_union           (GdkRegion    *source1,
  93.                   GdkRegion    *source2);
  94. void gdk_region_subtract        (GdkRegion    *source1,
  95.                  GdkRegion    *source2);
  96. void gdk_region_xor             (GdkRegion    *source1,
  97.                  GdkRegion    *source2);
  98.  
  99. void gdk_region_spans_intersect_foreach (GdkRegion   *region,
  100.                      GdkSpan     *spans,
  101.                      int          n_spans,
  102.                      gboolean     sorted,
  103.                      GdkSpanFunc  function,
  104.                      gpointer     data);
  105.  
  106. G_END_DECLS
  107.  
  108. #endif /* __GDK_REGION_H__ */
  109.  
  110.